package com.gosophia.commons.persistence.test.organizationManagement.entity;

import java.util.ArrayList;
import java.util.List;

import com.gosophia.commons.persistence.JoinSearchItems;
import com.gosophia.commons.persistence.SearchEnable;

/**
 * 组织机构实体
 * 
 * @author wxb、mayue
 * @since 2010-08-4 Copyright (c) 2010 Gosophia corporation All Rights Reserved.
 */
@SuppressWarnings("serial")
public class Organization implements java.io.Serializable {

	/**
	 * 机构主键id
	 */
	@SearchEnable
	private Long orgId;
	
	/**
	 * 版本
	 */
	private Long version;
	/**
	 * 机构代码
	 */
	private String orgCode;
	/**
	 * 机构名称
	 */
	@SearchEnable
	private String orgName;
	/**
	 * 机构地址
	 */
	@SearchEnable
	private String orgAddress;
	/**
	 * 机构邮编
	 */
	private String orgPostCode;
	/**
	 * 机构简称
	 */
	@SearchEnable
	private String orgShortName;
	/**
	 * 机构类别
	 */
//	private Long orgType;
	/**
	 * 机构邮箱
	 */
	private String orgMail;
//	/**
//	 * 负责人1名称
//	 */
//	private String principal1Name;
//	/**
//	 * 负责人1联系方式
//	 */
//	private String principal1TouchManner;
//	/**
//	 * 负责人1传真号
//	 */
//	private String principal1FaxNum;
//	/**
//	 * 负责人2名称
//	 */
//	private String principal2Name;
//	/**
//	 * 负责人2联系方式
//	 */
//	private String principal2TouchManner;
//	/**
//	 * 负责人2传真号
//	 */
//	private String principal2FaxNum;
	/**
	 * 备注
	 */
	private String orgNote;

	/**
	 * 子机构列表
	 */
	@JoinSearchItems(
			searchEnables = {
					@SearchEnable(searchProperty = "childOrgList.orgName"),
					@SearchEnable(searchProperty = "childOrgList.orgCode"),
					@SearchEnable(searchProperty = "childOrgList.orgAddress")
					})
	private List<Organization> childOrgList = new ArrayList<Organization>();
	/**
	 * 职位列表
	 */
	@SearchEnable(searchProperty = "positionList.positionName")
	private List<Position> positionList = new ArrayList<Position>();


	public Organization() {
    }

	public Organization(Long orgId, Long version) {
        super();
        this.orgId = orgId;
        this.version = version;
    }

    public Long getOrgId() {
		return orgId;
	}

	public void setOrgId(Long orgId) {
		this.orgId = orgId;
	}

	
	public Long getVersion() {
		return version;
	}

	public void setVersion(Long version) {
		this.version = version;
	}

	public String getOrgCode() {
		return orgCode;
	}

	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}

	public String getOrgName() {
		return orgName;
	}

	public void setOrgName(String orgName) {
		this.orgName = orgName;
	}

	public String getOrgAddress() {
		return orgAddress;
	}

	public void setOrgAddress(String orgAddress) {
		this.orgAddress = orgAddress;
	}

	public String getOrgPostCode() {
		return orgPostCode;
	}

	public void setOrgPostCode(String orgPostCode) {
		this.orgPostCode = orgPostCode;
	}

	public String getOrgShortName() {
		return orgShortName;
	}

	public void setOrgShortName(String orgShortName) {
		this.orgShortName = orgShortName;
	}


	public String getOrgMail() {
		return orgMail;
	}

	public void setOrgMail(String orgMail) {
		this.orgMail = orgMail;
	}

	public String getOrgNote() {
		return orgNote;
	}

	public void setOrgNote(String orgNote) {
		this.orgNote = orgNote;
	}

	public List<Organization> getChildOrgList() {
		return childOrgList;
	}

	public void setChildOrgList(List<Organization> childOrgList) {
		this.childOrgList = childOrgList;
	}

	public List<Position> getPositionList() {
		return positionList;
	}

	public void setPositionList(List<Position> positionList) {
		this.positionList = positionList;
	}


}
